package com.dvd.entity;

import java.io.Serializable;

public class DVDItem  implements Serializable{

	private static final long serialVersionUID= 1L;
	
	
	private Integer id;
	private String title;
	private Integer year;
	private String genre;
	
	public boolean equals(Object o){
		boolean valida= false;
		if(o != null && o instanceof DVDItem){
			DVDItem item = (DVDItem) o;
			
			//verify title DVD
			
				if(item.getTitle().equals(this.title)){
					valida=true;
				}
		}
		
		return valida;
	}
	
	
	
	public int hashCode(){
		return this.title.length()^2;
	}

	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	public String getGenre() {
		return genre;
	}

	public void setGenre(String genre) {
		this.genre = genre;
	}
	
	
	
}
